package com.llc.gulimall.ware.vo;

import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author wangwei
 * 2021/1/18 16:34
 *
 * 订单中的购物项
 */
@Data
public class OrderItemVo {

    private Long skuId;
    private String title;
    private String image;
    /**
     * 商品套餐属性
     */
    private List<String> skuAttrValues;
    private BigDecimal price;
    private Integer count;
    private BigDecimal totalPrice;
    //有货无货
    //private boolean hasStock ;
    private BigDecimal weight;


     //调用get方法自动计算总价
    public BigDecimal getTotalPrice() {
        return price.multiply(new BigDecimal(count.toString()));
    }


}
